######################################################## 
## Mod Title:   Yellow Card Admin Mod 
## Mod Version: 1.1.1. 
## Author:       Niels Chr. Rd Denmark < ncr@db9.dk > 
## Confirmed to RC-4 by Shion Uzuki 
## Description:  This mod is the admin part of yellow card mod. 
## It makes it posible for admin to control the limit of accepted yellow card 
## the admin can also edit the users profile, ad change the yellow cards, given to the user 
## 
## Fetures (all in admin panel): 
##   board configuation, ability to set yellow card limit (limit before users ##   are baned) 
##   board configuation, ability to set blue card limit (limit before 
##   modifyers are notified ) 
##   board configuation, ability to set blue card notification intervall 
##   forum permissions, who shall gain green card rigths 
##   forum permissions, who shall gain ban rigths to specific forums 
##   forum permissions, who shall gain blue card rigths to specific forums 
##   users profile, posible for admin to change number af yellow cards 
##   the user currently have 
##   Fetures (when viewing posts) 
## 
## This mod is only for phpBB2!! RC-4 
## 
## 
## Installation Level:  middle 
## Installation Time:   10-20 Minutes 
## Files To Edit:      10 
##   phpBB2/Admin/admin_board.php 
##   phpBB2/Admin/admin_users.php 
##   phpBB2/Admin/admin_userauth.php 
##   phpBB2/Admin/auth.php 
##   phpBB2/Admin/admin_ug_auth.php 
##   phpBB2/Admin/admin_forums.php    
##   phpBB2/Admin/admin_forumauth.php    
##   phpBB2/language/lang_XX/lang_admin.php 
##   phpBB2/templates/template_dirXX/board_config_body.tpl 
##   phpBB2/templates/template_dirXX/user_edit_body.tpl    

######################################################## 
## 
## Installation Notes: 
## 
## This mod has been tested and works on many different systems. 
## The most important thing to keep in mind is, take your time, make 
## sure you are finding the correct lines to modify, then take care to paste the new code. 
## Please also keep in mind, if you are using more than one language file or theme at your 
## site, you will need to edit the correct files for each occurrence.  Good Luck! 
######################################################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
# insert into SQL stuff.. 

SQL-query: 
ALTER TABLE forums ADD auth_ban TINYINT (2) DEFAULT '3' 

SQL-query: 
ALTER TABLE auth_access ADD auth_ban TINYINT (1) DEFAULT '0' 

SQL-query: 
INSERT INTO config (config_name, config_value) VALUES ('max_user_bancard', '10') 

SQL-query: 
ALTER TABLE forums ADD auth_greencard TINYINT (2) DEFAULT '5' 

SQL-query: 
ALTER TABLE forums ADD auth_bluecard TINYINT (2) DEFAULT '1' 

SQL-query: 
ALTER TABLE auth_access ADD auth_greencard TINYINT (1) DEFAULT '0' 

SQL-query: 
ALTER TABLE auth_access ADD auth_bluecard TINYINT (1) DEFAULT '0' 

SQL-query: 
INSERT INTO config (config_name, config_value) VALUES ('bluecard_limit', '3') 

SQL-query: 
INSERT INTO config (config_name, config_value) VALUES ('bluecard_limit_2', '1') 

SQL-query: 
ALTER TABLE posts ADD post_bluecard TINYINT (1) 

# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/admin/admin_board.php 

[FIND]: 

"L_ENABLE_PRUNE" => $lang['Enable_prune'], 

[ADD AFTER]: 

'L_BLUECARD_LIMIT' => $lang['Bluecard_limit'], 
'L_BLUECARD_LIMIT_EXPLAIN' => $lang['Bluecard_limit_explain'], 
'L_BLUECARD_LIMIT_2' => $lang['Bluecard_limit_2'], 
'L_BLUECARD_LIMIT_2_EXPLAIN' => $lang['Bluecard_limit_2_explain'], 
'L_MAX_USER_BANCARD' => $lang['Max_user_bancard'], 
'L_MAX_USER_BANCARD_EXPLAIN' => $lang['Max_user_bancard_explain'], 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

"PRUNE_NO" => $prune_no, 

[ADD AFTER]: 

'BLUECARD_LIMIT' => $new['bluecard_limit'], 
'BLUECARD_LIMIT_2' => $new['bluecard_limit_2'], 
'MAX_USER_BANCARD' => $new['max_user_bancard'], 


################################### This completes the changes in admin_board.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/language/lang_XX/lang_admin.php  (make sure to edit this file for every language your admin uses). 
#  AT THE BOTTOM OF THE PAGE 

[FIND]: 
// 
// That's all Folks! 

[ADD BEFORE]: 
//Added Yellow Card Admin mod 
$lang['Ban'] = "Ban"; 
$lang['Max_user_bancard'] = "Maximum number of ban cards"; 
$lang['Max_user_bancard_explain'] = "If a user gets more yellow cards than this limit, the user will be banned"; 
$lang['ban_card'] = "Yellow cards"; 
$lang['ban_card_explain'] = "The user will be banned when he/she excess %d yellow cards"; 
$lang['Greencard'] = "Greencard"; 
$lang['Bluecard'] = "Bluecard"; 
$lang['Bluecard_limit'] = "Intervall of bluecard"; 
$lang['Bluecard_limit_explain'] = "Notify the moderators again for every x bluecards given to a post"; 
$lang['Bluecard_limit_2'] = "Limit of bluecard"; 
$lang['Bluecard_limit_2_explain'] = "First notification to moderators are sent, when a post get this amout of blue cards"; 


################################### This completes the changes in lang_admin.php ############################## 



# 
#-----[ ACTION ]------------------------------------------ 
# 
#  OPEN FILE:  phpBB2/templates/SubSilver/admin/board_config_body.tpl  (make sure to edit this file for every theme your admin uses). 

[FIND]: 
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td> 
</tr> 

[ADD AFTER]: 
<tr> 
   <td class="row1">{L_BLUECARD_LIMIT_2}<br /><span class="gensmall">{L_BLUECARD_LIMIT_2_EXPLAIN}</span></td> 
   <td class="row2"><input type="text" size="4" maxlength="4" name="bluecard_limit_2" value="{BLUECARD_LIMIT_2}" /></td> 
</tr> 
<tr> 
   <td class="row1">{L_BLUECARD_LIMIT}<br /><span class="gensmall">{L_BLUECARD_LIMIT_EXPLAIN}</span></td> 
   <td class="row2"><input type="text" size="4" maxlength="4" name="bluecard_limit" value="{BLUECARD_LIMIT}" /></td> 
</tr> 
<tr> 
   <td class="row1">{L_MAX_USER_BANCARD}<br /><span class="gensmall">{L_MAX_USER_BANCARD_EXPLAIN}</span></td> 
   <td class="row2"><input type="text" size="4" maxlength="4" name="max_user_bancard" value="{MAX_USER_BANCARD}" /></td> 
</tr> 


################################### This completes the changes in board_config_body.tpl ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
#  Open file: phpBB2/Admin/admin_users.php 

[FIND]: 

$user_status = (!empty($HTTP_POST_VARS['user_status'])) ? intval($HTTP_POST_VARS['user_status']) : 0; 

[ADD AFTER]: 

$user_ycard = ($user_status) ? intval($HTTP_POST_VARS['user_ycard']) : 0; 


# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

$sql = "UPDATE " . USERS_TABLE . " 

[ADD BEFORE]: 

if ($user_ycard>=$board_config['max_user_bancard']) 
{ 
   $sql = "SELECT ban_userid FROM " . BANLIST_TABLE . " WHERE ban_userid=$user_id"; 
   if( $result = $db->sql_query($sql) ) 
   { 
      if (!$db->sql_fetchrowset($result)) 
      { 
         // insert the user in the ban list 
         $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid) VALUES ($user_id)"; 
         if (!$result = $db->sql_query($sql) ) 
            message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql); 
         else $no_error_ban=true; 
      } else $no_error_ban = true; 
   } else message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql); 
} else 
{ 
   // remove the ban, if there is any 
   $sql = "DELETE FROM " . BANLIST_TABLE . " WHERE ban_userid=$user_id"; 
   if (!$result = $db->sql_query($sql) ) 
      message_die(GENERAL_ERROR, "Couldn't remove ban_userid info into database", "", __LINE__, __FILE__, $sql); 
   else $no_error_ban=true; 
} 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND - if other mod, this can look sligthly different]: 

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank " .$avatar_sql . " 


[REPLACE WITH - other mods ? - se next replace]: 

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_ycard+1, user_rank = $user_rank " .$avatar_sql . " 


[REPLACE WITH - if you have bithday mod, replace with this insead]: 

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_ycard+1, user_rank = $user_rank, user_birthday = $birthday, user_next_birthday_greeting=$next_birthday_greeting " .$avatar_sql . " 

          
# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 
$user_status = $this_userdata['user_active']; 


[ADD AFTER]: 

$user_ycard = $user_status-1; 


# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

$s_hidden_fields .= '<input type="hidden" name="user_status" value="' . $user_status . '" />'; 

[ADD AFTER]: 

$s_hidden_fields .= '<input type="hidden" name="user_ycard" value="' . $user_ycard . '" />'; 

# 
#-----[ ACTION ]------------------------------------------ 
# 


[FIND]: 

"USER_ACTIVE_NO" => (!$user_status) ? 'checked="checked"' : '', 

[ADD AFTER]: 

"BANCARD" => $user_ycard, 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

"L_INTERESTS" => $lang['Interests'], 

[ADD AFTER]: 
"L_BANCARD" => $lang['ban_card'], 
"L_BANCARD_EXPLAIN" => sprintf($lang['ban_card_explain'], $board_config['max_user_bancard']), 


################################### This completes the changes in admin_users.php ############################## 
        
# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/templates/subsilver/admin/user_edit_body.tpl 

[FIND]: 

   <input type="radio" name="user_status" value="0" {USER_ACTIVE_NO} /> 
   <span class="gen">{L_NO}</span></td> 
</tr> 

[ADD AFTER]: 

<tr> 
   <td class="row1"><span class="gen">{L_BANCARD}:</span><br /><span class="gensmall">{L_BANCARD_EXPLAIN}<br /></td> 
   <td class="row2"><input type="text" class="post"style="width: 40px"  name="user_ycard" size="4" maxlength="4" value="{BANCARD}" /></td> 
</tr> 

################################### This completes the changes in user_edit_body.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/admin/admin_forums.php 

[FIND]: 

"auth_announce" => AUTH_MOD, 

[ADD AFTER]: 

"auth_ban" => AUTH_MOD, 
"auth_greencard" => AUTH_ADMIN, 
"auth_bluecard" => AUTH_REG, 

################################### This completes the changes in admin_forums.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/admin/admin_forumauth.php 

[FIND]: 
//                View      Read      Post      Reply     Edit     Delete    Sticky   Announce    Vote      Poll 
$simple_auth_ary = array( 
   0  => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG), 
   1  => array(AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG), 
   2  => array(AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG), 
   3  => array(AUTH_ALL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL), 
   4  => array(AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL), 
   5  => array(AUTH_ALL, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD), 
   6  => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD), 
); 

[REPLACE WITH]: 
//                View      Read      Post      Reply     Edit     Delete    Sticky   Announce    Vote      Poll   Warn/ban  Unban       Repport 
$simple_auth_ary = array( 
   0  => array(AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG,AUTH_MOD,AUTH_ADMIN,AUTH_REG), 
   1  => array(AUTH_ALL, AUTH_ALL, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
   2  => array(AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_MOD, AUTH_REG, AUTH_REG, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
   3  => array(AUTH_ALL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
   4  => array(AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ACL, AUTH_ACL, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
   5  => array(AUTH_ALL, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
   6  => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_ADMIN, AUTH_REG), 
); 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate"); 

[REPLACE WITH]: 

$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate", "auth_ban", "auth_greencard", "auth_bluecard"); 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 
"auth_pollcreate" => $lang['Pollcreate']); 

[REPLACE WITH]: 
"auth_pollcreate" => $lang['Pollcreate'], 
"auth_ban" => $lang['Ban'], 
"auth_greencard" => $lang['Greencard'], 
"auth_bluecard" => $lang['Bluecard']); 

################################### This completes the changes in admin_forumauth.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/Admin/admin_forums.php 

[FIND]: 
"auth_pollcreate" => AUTH_REG); 

[REPLACE WITH]: 
"auth_pollcreate" => AUTH_REG, 
"auth_ban" => AUTH_MOD, 
"auth_greencard" => AUTH_ADMIN, 
"auth_bluecard" => AUTH_REG); 

################################### This completes the changes in admin_forums.php ############################## 
# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/Admin/admin_ug_auth.php 

[FIND]: 
$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate"); 

[REPLACE WITH]: 
$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate","auth_ban","auth_greencard","auth_bluecard"); 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 
"auth_pollcreate" => AUTH_POLLCREATE); 

[REPLACE WITH]: 
"auth_pollcreate" => AUTH_POLLCREATE, 
"auth_ban" => AUTH_BAN, 
"auth_greencard" => AUTH_GREENCARD, 
"auth_bluecard" => AUTH_BLUECARD); 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 
"auth_pollcreate" => $lang['Pollcreate']); 

[REPLACE WITH]; 
"auth_pollcreate" => $lang['Pollcreate'], 
"auth_ban" => $lang['ban_card'], 
"auth_greencard" => $lang['Greencard'] , 
"auth_bluecard" => $lang['Bluecard'] ); 


################################### This completes the changes in admin_ug_auth.php ############################## 

# 
#-----[ ACTION ]------------------------------------------ 
# 
## OPEN FILE:  phpBB2/includes/auth.php 

[FIND]: 

VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE, 
   ATTACH 

[ADD to the end of LINE]: 
, BAN, GREENCARD, BLUECARD 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

$a_sql = "a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate"; 

[REPLACE WITH]: 
$a_sql = "a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_vote, a.auth_pollcreate, a.auth_ban, a.auth_greencard, a.auth_bluecard"; 


# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 
$auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate"); 
[REPLACE WITH]: 
$auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate", "auth_ban", "auth_greencard", "auth_bluecard"); 

# 
#-----[ ACTION ]------------------------------------------ 
# 

[FIND]: 

case AUTH_VOTE: 
   $a_sql = "a.auth_vote"; 
   $auth_fields = array("auth_vote"); 
   break; 

[ADD AFTER]: 

case AUTH_BAN: 
   $a_sql = "a.auth_ban"; 
   $auth_fields = array("auth_ban"); 
   break; 
case AUTH_GREENCARD: 
   $a_sql = "a.auth_greencard"; 
   $auth_fields = array("auth_greencard"); 
   break; 
case AUTH_BLUECARD: 
   $a_sql = "a.auth_bluecard"; 
   $auth_fields = array("auth_bluecard"); 
   break; 

################################### This completes the changes in auth.php ############################## 


# that's all 
# PART 1 is now done